package com.study.talk.module.netty.message.request;

import com.study.talk.module.netty.message.MessageType;
import com.study.talk.module.netty.message.TalkMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 登录请求
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginRequest extends TalkMessage {

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("上线后是否发送消息缓存")
    private Boolean sendMessageCache = true;

    @ApiModelProperty("是否首次登录")
    private Boolean first = false;

    @ApiModelProperty("认证token")
    private String token;

    @Override
    public byte getType() {
        return MessageType.LOGIN_REQUEST;
    }
}
